#include <cs50.h>
#include <stdio.h>

int main () {
	float diameter = 0;
	do {
		printf("请输入圆的直径：");
		diameter = GetFloat();
	} while (diameter <= 0);

	float c = 3.14 * diameter;
	printf("圆的周长是：%.2f \n", c);

	float s = 3.14 * (diameter / (float)2) * (diameter / (float)2);
	printf("圆的面积是：%.2f \n", s);
}

